package edu.zut.cs.software.example.group.domain;

import javax.persistence.Column;


import javax.persistence.Entity;
import javax.persistence.Table;


//import javax.persistence.Id;//@id注解的导入


import edu.zut.cs.software.example.domain.BaseEntity;

/**
 * entity class for group
 * 
 * @author super
 *
 */

@Entity
@Table(name = "T_GROUP")
public class Group extends BaseEntity<Long> {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * name for group
	 * 
	 * The name is the class name or self - name
	 */
   //通过@ID注解可将属性定义为主键，详情见665
	@Column
	String name;

	/**
	 * type for group
	 * 
	 */
	@Column
	String groupType;

	/**
	 * number for group
	 * 
	 * Number of people in the group
	 */
	@Column
	String number;

	/**
	 * Many product objects relate to one category of product.
	 */

	/*
	 * @ManyToOne
	 * 
	 * @JoinColumn(name = "GROUP_CATEGORY_ID") GroupCategory groupCategory;
	 * 
	 * public GroupCategory getGroupCategory() { return groupCategory; }
	 * 
	 * public void setGroupCategory(GroupCategory groupCategory) {
	 * this.groupCategory = groupCategory; }
	 */

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getGroupType() {
		return groupType;
	}

	public void setGroupType(String groupType) {
		this.groupType = groupType;
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	@Override
	public String toString() {
		return "Group [name=" + name + ", groupType=" + groupType + ", number=" + number + "]";
	}

}
